﻿using System;
using System.Data;
using Model;
using DBUtility;

namespace DAL
{
     /// <summary>
     /// 数据访问层RESULT_DPCG_DAL
     /// </summary>
     public class RESULT_DPCG_DAL
     {
         public RESULT_DPCG_DAL()
         {
         }


         /// <summary>
         /// 得到最大JCLSH
         /// </summary>
         public string GetMax_JCLSH(string p_strWhere)
         {
             string strResult = "0";
             string strSql = "select max(JCLSH) as m from RESULT_DPCG";

             if(p_strWhere.Trim().Length > 0)
             {
                 strSql += " where " + p_strWhere;
             }

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             if(dtTemp.Rows.Count>0)
             {
                 if(dtTemp.Rows[0]["m"].ToString().Length>0)
                 {
                     strResult = dtTemp.Rows[0]["m"] == DBNull.Value ? "" : dtTemp.Rows[0]["m"].ToString();
                 }
             }

             dtTemp.Dispose();

             return string.Format("{0:D50}", Convert.ToInt32(strResult) + 1);

          }

          /// <summary>
          /// 得到最大JCLSH
          /// </summary>
          public string GetMax_JCLSH()
          {
              return GetMax_JCLSH("");
          }


          /// <summary>
          /// 判断数据是否存在
          /// </summary>
          public bool Exists(string strJCLSH)
          {
               bool bolResult = false;

               if (strJCLSH == null)
               {
                   return false;
               }

               if (strJCLSH.Length == 0)
               {
                   return false;
               }

               string strSql = "";
               strSql += "select count(1) as c from RESULT_DPCG";
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               DataTable dtTemp = new DataTable();
               DbHelper.GetTable(strSql, ref dtTemp);

               if (dtTemp.Rows.Count > 0)
               {
                   bolResult = Convert.ToInt32(dtTemp.Rows[0]["c"]) > 0;
               }

               dtTemp.Dispose();

               return bolResult;

          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount(string p_strWhere)
          {
              int intResult=0;

              string strSql = "";
              strSql += "select count(1) as c from RESULT_DPCG";
              if(p_strWhere.Trim().Length > 0)
              {
                 strSql += " where " + p_strWhere;
              }

              DataTable dtTemp = new DataTable();
              DbHelper.GetTable(strSql, ref dtTemp);

              if(dtTemp.Rows.Count>0)
              {
                  intResult=Convert.ToInt32(dtTemp.Rows[0]["c"]);
              }

              dtTemp.Dispose();

              return intResult;
          }

          /// <summary>
          /// 获取数据总记录数
          /// </summary>
          public int GetRecordCount()
          {
              return GetRecordCount("");
          }

          /// <summary>
          /// 获取数据分页总数
           /// </summary>
          public int GetPageCount(string p_strWhere, int p_intPageSize)
          {
              int intResult=0;

              if(p_intPageSize > 0)
              {
                  int intRecordCount = GetRecordCount(p_strWhere);
                  intResult = Convert.ToInt32(Math.Truncate(Convert.ToDecimal(intRecordCount) / Convert.ToDecimal(p_intPageSize)));
                  if (intRecordCount > (intResult * p_intPageSize))
                  {
                       intResult++;
                  }
              }

              if(intResult == 0)
              {
                   intResult++;
              }
              return intResult;
           }

          /// <summary>
          /// 获取数据分页总数
          /// </summary>
          public int GetPageCount(int p_intPageSize)
          {
              return GetPageCount("", p_intPageSize);
          }

          /// <summary>
          /// 添加一条数据 SQL
          /// </summary>
          public string InsertSQL(RESULT_DPCG model)
          {
              string strFieldSQL = "";
              string strValueSQL = "";

              if(model.Changed("ID") == true)
              {
                   strFieldSQL += ",ID";
                   strValueSQL += "," + model.ID + "";
              }

              if(model.Changed("JCLSH") == true)
              {
                   strFieldSQL += ",JCLSH";
                   strValueSQL += ",'" + model.JCLSH.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGJCCS") == true)
              {
                   strFieldSQL += ",DPCGJCCS";
                   strValueSQL += ",'" + model.DPCGJCCS.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_SDSD") == true)
              {
                   strFieldSQL += ",NJGK_SDSD";
                   strValueSQL += ",'" + model.NJGK_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_SCGL") == true)
              {
                   strFieldSQL += ",NJGK_SCGL";
                   strValueSQL += ",'" + model.NJGK_SCGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_XZGL") == true)
              {
                   strFieldSQL += ",NJGK_XZGL";
                   strValueSQL += ",'" + model.NJGK_XZGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_LBGL") == true)
              {
                   strFieldSQL += ",NJGK_LBGL";
                   strValueSQL += ",'" + model.NJGK_LBGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_YXBZ") == true)
              {
                   strFieldSQL += ",NJGL_YXBZ";
                   strValueSQL += ",'" + model.NJGL_YXBZ.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_SCBZ") == true)
              {
                   strFieldSQL += ",NJGL_SCBZ";
                   strValueSQL += ",'" + model.NJGL_SCBZ.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_PD") == true)
              {
                   strFieldSQL += ",NJGL_PD";
                   strValueSQL += ",'" + model.NJGL_PD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_SDSD") == true)
              {
                   strFieldSQL += ",GLGK_SDSD";
                   strValueSQL += ",'" + model.GLGK_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_SCGL") == true)
              {
                   strFieldSQL += ",GLGK_SCGL";
                   strValueSQL += ",'" + model.GLGK_SCGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_XZGL") == true)
              {
                   strFieldSQL += ",GLGK_XZGL";
                   strValueSQL += ",'" + model.GLGK_XZGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_LBGL") == true)
              {
                   strFieldSQL += ",GLGK_LBGL";
                   strValueSQL += ",'" + model.GLGK_LBGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_YXBZ") == true)
              {
                   strFieldSQL += ",GLGL_YXBZ";
                   strValueSQL += ",'" + model.GLGL_YXBZ.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_SCBZ") == true)
              {
                   strFieldSQL += ",GLGL_SCBZ";
                   strValueSQL += ",'" + model.GLGL_SCBZ.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_PD") == true)
              {
                   strFieldSQL += ",GLGL_PD";
                   strValueSQL += ",'" + model.GLGL_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SU_SDSD") == true)
              {
                   strFieldSQL += ",SU_SDSD";
                   strValueSQL += ",'" + model.SU_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("SU_JG") == true)
              {
                   strFieldSQL += ",SU_JG";
                   strValueSQL += ",'" + model.SU_JG.Replace("'","''") + "'";
              }

              if(model.Changed("SU_BZXX") == true)
              {
                   strFieldSQL += ",SU_BZXX";
                   strValueSQL += ",'" + model.SU_BZXX.Replace("'","''") + "'";
              }

              if(model.Changed("SU_BZSX") == true)
              {
                   strFieldSQL += ",SU_BZSX";
                   strValueSQL += ",'" + model.SU_BZSX.Replace("'","''") + "'";
              }

              if(model.Changed("SU_PD") == true)
              {
                   strFieldSQL += ",SU_PD";
                   strValueSQL += ",'" + model.SU_PD.Replace("'","''") + "'";
              }

              if(model.Changed("LC_SDLC") == true)
              {
                   strFieldSQL += ",LC_SDLC";
                   strValueSQL += ",'" + model.LC_SDLC.Replace("'","''") + "'";
              }

              if(model.Changed("LC_JG") == true)
              {
                   strFieldSQL += ",LC_JG";
                   strValueSQL += ",'" + model.LC_JG.Replace("'","''") + "'";
              }

              if(model.Changed("LC_XZ") == true)
              {
                   strFieldSQL += ",LC_XZ";
                   strValueSQL += ",'" + model.LC_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("LC_PD") == true)
              {
                   strFieldSQL += ",LC_PD";
                   strValueSQL += ",'" + model.LC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_KSSD") == true)
              {
                   strFieldSQL += ",JS_KSSD";
                   strValueSQL += ",'" + model.JS_KSSD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_JSSD") == true)
              {
                   strFieldSQL += ",JS_JSSD";
                   strValueSQL += ",'" + model.JS_JSSD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_SJ") == true)
              {
                   strFieldSQL += ",JS_SJ";
                   strValueSQL += ",'" + model.JS_SJ.Replace("'","''") + "'";
              }

              if(model.Changed("JS_XZ") == true)
              {
                   strFieldSQL += ",JS_XZ";
                   strValueSQL += ",'" + model.JS_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("JS_PD") == true)
              {
                   strFieldSQL += ",JS_PD";
                   strValueSQL += ",'" + model.JS_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_KSSD") == true)
              {
                   strFieldSQL += ",HX_KSSD";
                   strValueSQL += ",'" + model.HX_KSSD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_JSSD") == true)
              {
                   strFieldSQL += ",HX_JSSD";
                   strValueSQL += ",'" + model.HX_JSSD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_SJ") == true)
              {
                   strFieldSQL += ",HX_SJ";
                   strValueSQL += ",'" + model.HX_SJ.Replace("'","''") + "'";
              }

              if(model.Changed("HX_LC") == true)
              {
                   strFieldSQL += ",HX_LC";
                   strValueSQL += ",'" + model.HX_LC.Replace("'","''") + "'";
              }

              if(model.Changed("HX_XZ") == true)
              {
                   strFieldSQL += ",HX_XZ";
                   strValueSQL += ",'" + model.HX_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("HX_PD") == true)
              {
                   strFieldSQL += ",HX_PD";
                   strValueSQL += ",'" + model.HX_PD.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGWD") == true)
              {
                   strFieldSQL += ",DPCGWD";
                   strValueSQL += ",'" + model.DPCGWD.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGDQY") == true)
              {
                   strFieldSQL += ",DPCGDQY";
                   strValueSQL += ",'" + model.DPCGDQY.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGSD") == true)
              {
                   strFieldSQL += ",DPCGSD";
                   strValueSQL += ",'" + model.DPCGSD.Replace("'","''") + "'";
              }

              if(model.Changed("CG_POT") == true)
              {
                   strFieldSQL += ",CG_POT";
                   strValueSQL += ",'" + model.CG_POT.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD1") == true)
              {
                   strFieldSQL += ",CG_SDSD1";
                   strValueSQL += ",'" + model.CG_SDSD1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL1") == true)
              {
                   strFieldSQL += ",CG_SCGL1";
                   strValueSQL += ",'" + model.CG_SCGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL1") == true)
              {
                   strFieldSQL += ",CG_XZGL1";
                   strValueSQL += ",'" + model.CG_XZGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL1") == true)
              {
                   strFieldSQL += ",CG_LBGL1";
                   strValueSQL += ",'" + model.CG_LBGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD2") == true)
              {
                   strFieldSQL += ",CG_SDSD2";
                   strValueSQL += ",'" + model.CG_SDSD2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL2") == true)
              {
                   strFieldSQL += ",CG_SCGL2";
                   strValueSQL += ",'" + model.CG_SCGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL2") == true)
              {
                   strFieldSQL += ",CG_XZGL2";
                   strValueSQL += ",'" + model.CG_XZGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL2") == true)
              {
                   strFieldSQL += ",CG_LBGL2";
                   strValueSQL += ",'" + model.CG_LBGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD3") == true)
              {
                   strFieldSQL += ",CG_SDSD3";
                   strValueSQL += ",'" + model.CG_SDSD3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL3") == true)
              {
                   strFieldSQL += ",CG_SCGL3";
                   strValueSQL += ",'" + model.CG_SCGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL3") == true)
              {
                   strFieldSQL += ",CG_XZGL3";
                   strValueSQL += ",'" + model.CG_XZGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL3") == true)
              {
                   strFieldSQL += ",CG_LBGL3";
                   strValueSQL += ",'" + model.CG_LBGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD4") == true)
              {
                   strFieldSQL += ",CG_SDSD4";
                   strValueSQL += ",'" + model.CG_SDSD4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL4") == true)
              {
                   strFieldSQL += ",CG_SCGL4";
                   strValueSQL += ",'" + model.CG_SCGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL4") == true)
              {
                   strFieldSQL += ",CG_XZGL4";
                   strValueSQL += ",'" + model.CG_XZGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL4") == true)
              {
                   strFieldSQL += ",CG_LBGL4";
                   strValueSQL += ",'" + model.CG_LBGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD5") == true)
              {
                   strFieldSQL += ",CG_SDSD5";
                   strValueSQL += ",'" + model.CG_SDSD5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL5") == true)
              {
                   strFieldSQL += ",CG_SCGL5";
                   strValueSQL += ",'" + model.CG_SCGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL5") == true)
              {
                   strFieldSQL += ",CG_XZGL5";
                   strValueSQL += ",'" + model.CG_XZGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL5") == true)
              {
                   strFieldSQL += ",CG_LBGL5";
                   strValueSQL += ",'" + model.CG_LBGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD6") == true)
              {
                   strFieldSQL += ",CG_SDSD6";
                   strValueSQL += ",'" + model.CG_SDSD6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL6") == true)
              {
                   strFieldSQL += ",CG_SCGL6";
                   strValueSQL += ",'" + model.CG_SCGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL6") == true)
              {
                   strFieldSQL += ",CG_XZGL6";
                   strValueSQL += ",'" + model.CG_XZGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL6") == true)
              {
                   strFieldSQL += ",CG_LBGL6";
                   strValueSQL += ",'" + model.CG_LBGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD7") == true)
              {
                   strFieldSQL += ",CG_SDSD7";
                   strValueSQL += ",'" + model.CG_SDSD7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL7") == true)
              {
                   strFieldSQL += ",CG_SCGL7";
                   strValueSQL += ",'" + model.CG_SCGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL7") == true)
              {
                   strFieldSQL += ",CG_XZGL7";
                   strValueSQL += ",'" + model.CG_XZGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL7") == true)
              {
                   strFieldSQL += ",CG_LBGL7";
                   strValueSQL += ",'" + model.CG_LBGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD8") == true)
              {
                   strFieldSQL += ",CG_SDSD8";
                   strValueSQL += ",'" + model.CG_SDSD8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL8") == true)
              {
                   strFieldSQL += ",CG_SCGL8";
                   strValueSQL += ",'" + model.CG_SCGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL8") == true)
              {
                   strFieldSQL += ",CG_XZGL8";
                   strValueSQL += ",'" + model.CG_XZGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL8") == true)
              {
                   strFieldSQL += ",CG_LBGL8";
                   strValueSQL += ",'" + model.CG_LBGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD9") == true)
              {
                   strFieldSQL += ",CG_SDSD9";
                   strValueSQL += ",'" + model.CG_SDSD9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL9") == true)
              {
                   strFieldSQL += ",CG_SCGL9";
                   strValueSQL += ",'" + model.CG_SCGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL9") == true)
              {
                   strFieldSQL += ",CG_XZGL9";
                   strValueSQL += ",'" + model.CG_XZGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL9") == true)
              {
                   strFieldSQL += ",CG_LBGL9";
                   strValueSQL += ",'" + model.CG_LBGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD10") == true)
              {
                   strFieldSQL += ",CG_SDSD10";
                   strValueSQL += ",'" + model.CG_SDSD10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL10") == true)
              {
                   strFieldSQL += ",CG_SCGL10";
                   strValueSQL += ",'" + model.CG_SCGL10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL10") == true)
              {
                   strFieldSQL += ",CG_XZGL10";
                   strValueSQL += ",'" + model.CG_XZGL10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL10") == true)
              {
                   strFieldSQL += ",CG_LBGL10";
                   strValueSQL += ",'" + model.CG_LBGL10.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_JG") == true)
              {
                   strFieldSQL += ",ZGSD_JG";
                   strValueSQL += ",'" + model.ZGSD_JG.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_BZ") == true)
              {
                   strFieldSQL += ",ZGSD_BZ";
                   strValueSQL += ",'" + model.ZGSD_BZ.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_PD") == true)
              {
                   strFieldSQL += ",ZGSD_PD";
                   strValueSQL += ",'" + model.ZGSD_PD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_ZS") == true)
              {
                   strFieldSQL += ",GLGK_ZS";
                   strValueSQL += ",'" + model.GLGK_ZS.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_ZS") == true)
              {
                   strFieldSQL += ",NJGK_ZS";
                   strValueSQL += ",'" + model.NJGK_ZS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_DBGL") == true)
              {
                   strFieldSQL += ",GK_DBGL";
                   strValueSQL += ",'" + model.GK_DBGL.Replace("'","''") + "'";
              }

              if(model.Changed("GK_EDCS") == true)
              {
                   strFieldSQL += ",GK_EDCS";
                   strValueSQL += ",'" + model.GK_EDCS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_JZL") == true)
              {
                   strFieldSQL += ",GK_JZL";
                   strValueSQL += ",'" + model.GK_JZL.Replace("'","''") + "'";
              }

              if(model.Changed("GK_WDCS") == true)
              {
                   strFieldSQL += ",GK_WDCS";
                   strValueSQL += ",'" + model.GK_WDCS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_PD") == true)
              {
                   strFieldSQL += ",GK_PD";
                   strValueSQL += ",'" + model.GK_PD.Replace("'","''") + "'";
              }

              if(model.Changed("YH_SCZ") == true)
              {
                   strFieldSQL += ",YH_SCZ";
                   strValueSQL += ",'" + model.YH_SCZ.Replace("'","''") + "'";
              }

              if(model.Changed("YH_BZ") == true)
              {
                   strFieldSQL += ",YH_BZ";
                   strValueSQL += ",'" + model.YH_BZ.Replace("'","''") + "'";
              }

              if(model.Changed("YH_LC") == true)
              {
                   strFieldSQL += ",YH_LC";
                   strValueSQL += ",'" + model.YH_LC.Replace("'","''") + "'";
              }

              if(model.Changed("YH_SD") == true)
              {
                   strFieldSQL += ",YH_SD";
                   strValueSQL += ",'" + model.YH_SD.Replace("'","''") + "'";
              }

              if(model.Changed("YH_JZL") == true)
              {
                   strFieldSQL += ",YH_JZL";
                   strValueSQL += ",'" + model.YH_JZL.Replace("'","''") + "'";
              }

              if(model.Changed("YH_PD") == true)
              {
                   strFieldSQL += ",YH_PD";
                   strValueSQL += ",'" + model.YH_PD.Replace("'","''") + "'";
              }

              string strSql = "";
              strSql += "insert into RESULT_DPCG";
              strSql += "(";
              strSql += strFieldSQL.Substring(1);
              strSql += ")";
              strSql += " values";
              strSql += "(";
              strSql += strValueSQL.Substring(1);
              strSql += ")";

              return strSql;
          }

          /// <summary>
          /// 添加一条数据
          /// </summary>
          public bool Insert(RESULT_DPCG model)
          {
              return DbHelper.ExecuteSql(InsertSQL(model));
          }

          /// <summary>
          /// 修改一条数据 SQL
          /// </summary>
          public string UpdateSQL(RESULT_DPCG model,string strJCLSH)
          {
              string strUpdateSQL = "";

              if(model.Changed("ID") == true)
              {
                  strUpdateSQL += ",ID=" + model.ID + "";
              }

              if(model.Changed("JCLSH") == true)
              {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGJCCS") == true)
              {
                  strUpdateSQL += ",DPCGJCCS='" + model.DPCGJCCS.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_SDSD") == true)
              {
                  strUpdateSQL += ",NJGK_SDSD='" + model.NJGK_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_SCGL") == true)
              {
                  strUpdateSQL += ",NJGK_SCGL='" + model.NJGK_SCGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_XZGL") == true)
              {
                  strUpdateSQL += ",NJGK_XZGL='" + model.NJGK_XZGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_LBGL") == true)
              {
                  strUpdateSQL += ",NJGK_LBGL='" + model.NJGK_LBGL.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_YXBZ") == true)
              {
                  strUpdateSQL += ",NJGL_YXBZ='" + model.NJGL_YXBZ.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_SCBZ") == true)
              {
                  strUpdateSQL += ",NJGL_SCBZ='" + model.NJGL_SCBZ.Replace("'","''") + "'";
              }

              if(model.Changed("NJGL_PD") == true)
              {
                  strUpdateSQL += ",NJGL_PD='" + model.NJGL_PD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_SDSD") == true)
              {
                  strUpdateSQL += ",GLGK_SDSD='" + model.GLGK_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_SCGL") == true)
              {
                  strUpdateSQL += ",GLGK_SCGL='" + model.GLGK_SCGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_XZGL") == true)
              {
                  strUpdateSQL += ",GLGK_XZGL='" + model.GLGK_XZGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_LBGL") == true)
              {
                  strUpdateSQL += ",GLGK_LBGL='" + model.GLGK_LBGL.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_YXBZ") == true)
              {
                  strUpdateSQL += ",GLGL_YXBZ='" + model.GLGL_YXBZ.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_SCBZ") == true)
              {
                  strUpdateSQL += ",GLGL_SCBZ='" + model.GLGL_SCBZ.Replace("'","''") + "'";
              }

              if(model.Changed("GLGL_PD") == true)
              {
                  strUpdateSQL += ",GLGL_PD='" + model.GLGL_PD.Replace("'","''") + "'";
              }

              if(model.Changed("SU_SDSD") == true)
              {
                  strUpdateSQL += ",SU_SDSD='" + model.SU_SDSD.Replace("'","''") + "'";
              }

              if(model.Changed("SU_JG") == true)
              {
                  strUpdateSQL += ",SU_JG='" + model.SU_JG.Replace("'","''") + "'";
              }

              if(model.Changed("SU_BZXX") == true)
              {
                  strUpdateSQL += ",SU_BZXX='" + model.SU_BZXX.Replace("'","''") + "'";
              }

              if(model.Changed("SU_BZSX") == true)
              {
                  strUpdateSQL += ",SU_BZSX='" + model.SU_BZSX.Replace("'","''") + "'";
              }

              if(model.Changed("SU_PD") == true)
              {
                  strUpdateSQL += ",SU_PD='" + model.SU_PD.Replace("'","''") + "'";
              }

              if(model.Changed("LC_SDLC") == true)
              {
                  strUpdateSQL += ",LC_SDLC='" + model.LC_SDLC.Replace("'","''") + "'";
              }

              if(model.Changed("LC_JG") == true)
              {
                  strUpdateSQL += ",LC_JG='" + model.LC_JG.Replace("'","''") + "'";
              }

              if(model.Changed("LC_XZ") == true)
              {
                  strUpdateSQL += ",LC_XZ='" + model.LC_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("LC_PD") == true)
              {
                  strUpdateSQL += ",LC_PD='" + model.LC_PD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_KSSD") == true)
              {
                  strUpdateSQL += ",JS_KSSD='" + model.JS_KSSD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_JSSD") == true)
              {
                  strUpdateSQL += ",JS_JSSD='" + model.JS_JSSD.Replace("'","''") + "'";
              }

              if(model.Changed("JS_SJ") == true)
              {
                  strUpdateSQL += ",JS_SJ='" + model.JS_SJ.Replace("'","''") + "'";
              }

              if(model.Changed("JS_XZ") == true)
              {
                  strUpdateSQL += ",JS_XZ='" + model.JS_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("JS_PD") == true)
              {
                  strUpdateSQL += ",JS_PD='" + model.JS_PD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_KSSD") == true)
              {
                  strUpdateSQL += ",HX_KSSD='" + model.HX_KSSD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_JSSD") == true)
              {
                  strUpdateSQL += ",HX_JSSD='" + model.HX_JSSD.Replace("'","''") + "'";
              }

              if(model.Changed("HX_SJ") == true)
              {
                  strUpdateSQL += ",HX_SJ='" + model.HX_SJ.Replace("'","''") + "'";
              }

              if(model.Changed("HX_LC") == true)
              {
                  strUpdateSQL += ",HX_LC='" + model.HX_LC.Replace("'","''") + "'";
              }

              if(model.Changed("HX_XZ") == true)
              {
                  strUpdateSQL += ",HX_XZ='" + model.HX_XZ.Replace("'","''") + "'";
              }

              if(model.Changed("HX_PD") == true)
              {
                  strUpdateSQL += ",HX_PD='" + model.HX_PD.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGWD") == true)
              {
                  strUpdateSQL += ",DPCGWD='" + model.DPCGWD.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGDQY") == true)
              {
                  strUpdateSQL += ",DPCGDQY='" + model.DPCGDQY.Replace("'","''") + "'";
              }

              if(model.Changed("DPCGSD") == true)
              {
                  strUpdateSQL += ",DPCGSD='" + model.DPCGSD.Replace("'","''") + "'";
              }

              if(model.Changed("CG_POT") == true)
              {
                  strUpdateSQL += ",CG_POT='" + model.CG_POT.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD1") == true)
              {
                  strUpdateSQL += ",CG_SDSD1='" + model.CG_SDSD1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL1") == true)
              {
                  strUpdateSQL += ",CG_SCGL1='" + model.CG_SCGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL1") == true)
              {
                  strUpdateSQL += ",CG_XZGL1='" + model.CG_XZGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL1") == true)
              {
                  strUpdateSQL += ",CG_LBGL1='" + model.CG_LBGL1.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD2") == true)
              {
                  strUpdateSQL += ",CG_SDSD2='" + model.CG_SDSD2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL2") == true)
              {
                  strUpdateSQL += ",CG_SCGL2='" + model.CG_SCGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL2") == true)
              {
                  strUpdateSQL += ",CG_XZGL2='" + model.CG_XZGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL2") == true)
              {
                  strUpdateSQL += ",CG_LBGL2='" + model.CG_LBGL2.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD3") == true)
              {
                  strUpdateSQL += ",CG_SDSD3='" + model.CG_SDSD3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL3") == true)
              {
                  strUpdateSQL += ",CG_SCGL3='" + model.CG_SCGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL3") == true)
              {
                  strUpdateSQL += ",CG_XZGL3='" + model.CG_XZGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL3") == true)
              {
                  strUpdateSQL += ",CG_LBGL3='" + model.CG_LBGL3.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD4") == true)
              {
                  strUpdateSQL += ",CG_SDSD4='" + model.CG_SDSD4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL4") == true)
              {
                  strUpdateSQL += ",CG_SCGL4='" + model.CG_SCGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL4") == true)
              {
                  strUpdateSQL += ",CG_XZGL4='" + model.CG_XZGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL4") == true)
              {
                  strUpdateSQL += ",CG_LBGL4='" + model.CG_LBGL4.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD5") == true)
              {
                  strUpdateSQL += ",CG_SDSD5='" + model.CG_SDSD5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL5") == true)
              {
                  strUpdateSQL += ",CG_SCGL5='" + model.CG_SCGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL5") == true)
              {
                  strUpdateSQL += ",CG_XZGL5='" + model.CG_XZGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL5") == true)
              {
                  strUpdateSQL += ",CG_LBGL5='" + model.CG_LBGL5.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD6") == true)
              {
                  strUpdateSQL += ",CG_SDSD6='" + model.CG_SDSD6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL6") == true)
              {
                  strUpdateSQL += ",CG_SCGL6='" + model.CG_SCGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL6") == true)
              {
                  strUpdateSQL += ",CG_XZGL6='" + model.CG_XZGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL6") == true)
              {
                  strUpdateSQL += ",CG_LBGL6='" + model.CG_LBGL6.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD7") == true)
              {
                  strUpdateSQL += ",CG_SDSD7='" + model.CG_SDSD7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL7") == true)
              {
                  strUpdateSQL += ",CG_SCGL7='" + model.CG_SCGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL7") == true)
              {
                  strUpdateSQL += ",CG_XZGL7='" + model.CG_XZGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL7") == true)
              {
                  strUpdateSQL += ",CG_LBGL7='" + model.CG_LBGL7.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD8") == true)
              {
                  strUpdateSQL += ",CG_SDSD8='" + model.CG_SDSD8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL8") == true)
              {
                  strUpdateSQL += ",CG_SCGL8='" + model.CG_SCGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL8") == true)
              {
                  strUpdateSQL += ",CG_XZGL8='" + model.CG_XZGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL8") == true)
              {
                  strUpdateSQL += ",CG_LBGL8='" + model.CG_LBGL8.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD9") == true)
              {
                  strUpdateSQL += ",CG_SDSD9='" + model.CG_SDSD9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL9") == true)
              {
                  strUpdateSQL += ",CG_SCGL9='" + model.CG_SCGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL9") == true)
              {
                  strUpdateSQL += ",CG_XZGL9='" + model.CG_XZGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL9") == true)
              {
                  strUpdateSQL += ",CG_LBGL9='" + model.CG_LBGL9.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SDSD10") == true)
              {
                  strUpdateSQL += ",CG_SDSD10='" + model.CG_SDSD10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_SCGL10") == true)
              {
                  strUpdateSQL += ",CG_SCGL10='" + model.CG_SCGL10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_XZGL10") == true)
              {
                  strUpdateSQL += ",CG_XZGL10='" + model.CG_XZGL10.Replace("'","''") + "'";
              }

              if(model.Changed("CG_LBGL10") == true)
              {
                  strUpdateSQL += ",CG_LBGL10='" + model.CG_LBGL10.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_JG") == true)
              {
                  strUpdateSQL += ",ZGSD_JG='" + model.ZGSD_JG.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_BZ") == true)
              {
                  strUpdateSQL += ",ZGSD_BZ='" + model.ZGSD_BZ.Replace("'","''") + "'";
              }

              if(model.Changed("ZGSD_PD") == true)
              {
                  strUpdateSQL += ",ZGSD_PD='" + model.ZGSD_PD.Replace("'","''") + "'";
              }

              if(model.Changed("GLGK_ZS") == true)
              {
                  strUpdateSQL += ",GLGK_ZS='" + model.GLGK_ZS.Replace("'","''") + "'";
              }

              if(model.Changed("NJGK_ZS") == true)
              {
                  strUpdateSQL += ",NJGK_ZS='" + model.NJGK_ZS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_DBGL") == true)
              {
                  strUpdateSQL += ",GK_DBGL='" + model.GK_DBGL.Replace("'","''") + "'";
              }

              if(model.Changed("GK_EDCS") == true)
              {
                  strUpdateSQL += ",GK_EDCS='" + model.GK_EDCS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_JZL") == true)
              {
                  strUpdateSQL += ",GK_JZL='" + model.GK_JZL.Replace("'","''") + "'";
              }

              if(model.Changed("GK_WDCS") == true)
              {
                  strUpdateSQL += ",GK_WDCS='" + model.GK_WDCS.Replace("'","''") + "'";
              }

              if(model.Changed("GK_PD") == true)
              {
                  strUpdateSQL += ",GK_PD='" + model.GK_PD.Replace("'","''") + "'";
              }

              if(model.Changed("YH_SCZ") == true)
              {
                  strUpdateSQL += ",YH_SCZ='" + model.YH_SCZ.Replace("'","''") + "'";
              }

              if(model.Changed("YH_BZ") == true)
              {
                  strUpdateSQL += ",YH_BZ='" + model.YH_BZ.Replace("'","''") + "'";
              }

              if(model.Changed("YH_LC") == true)
              {
                  strUpdateSQL += ",YH_LC='" + model.YH_LC.Replace("'","''") + "'";
              }

              if(model.Changed("YH_SD") == true)
              {
                  strUpdateSQL += ",YH_SD='" + model.YH_SD.Replace("'","''") + "'";
              }

              if(model.Changed("YH_JZL") == true)
              {
                  strUpdateSQL += ",YH_JZL='" + model.YH_JZL.Replace("'","''") + "'";
              }

              if(model.Changed("YH_PD") == true)
              {
                  strUpdateSQL += ",YH_PD='" + model.YH_PD.Replace("'","''") + "'";
              }

               string strSql = "";
               strSql += "update RESULT_DPCG set ";
               strSql += strUpdateSQL.Substring(1);
               strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

               return strSql;
          }

          /// <summary>
          /// 修改一条数据
          /// </summary>
          public bool Update(RESULT_DPCG model, string strJCLSH)
          {
              return DbHelper.ExecuteSql(UpdateSQL(model, strJCLSH));
          }

          /// <summary>
          /// 修改一个集合 SQL
          /// </summary>
           public string UpdateRangeSQL(RESULT_DPCG model, string p_strWhere)
          {
               string strUpdateSQL = "";

               if(model.Changed("ID") == true)
               {
                  strUpdateSQL += ",ID=" + model.ID + "";
               }

               if(model.Changed("JCLSH") == true)
               {
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
               }

               if(model.Changed("DPCGJCCS") == true)
               {
                  strUpdateSQL += ",DPCGJCCS='" + model.DPCGJCCS.Replace("'","''") + "'";
               }

               if(model.Changed("NJGK_SDSD") == true)
               {
                  strUpdateSQL += ",NJGK_SDSD='" + model.NJGK_SDSD.Replace("'","''") + "'";
               }

               if(model.Changed("NJGK_SCGL") == true)
               {
                  strUpdateSQL += ",NJGK_SCGL='" + model.NJGK_SCGL.Replace("'","''") + "'";
               }

               if(model.Changed("NJGK_XZGL") == true)
               {
                  strUpdateSQL += ",NJGK_XZGL='" + model.NJGK_XZGL.Replace("'","''") + "'";
               }

               if(model.Changed("NJGK_LBGL") == true)
               {
                  strUpdateSQL += ",NJGK_LBGL='" + model.NJGK_LBGL.Replace("'","''") + "'";
               }

               if(model.Changed("NJGL_YXBZ") == true)
               {
                  strUpdateSQL += ",NJGL_YXBZ='" + model.NJGL_YXBZ.Replace("'","''") + "'";
               }

               if(model.Changed("NJGL_SCBZ") == true)
               {
                  strUpdateSQL += ",NJGL_SCBZ='" + model.NJGL_SCBZ.Replace("'","''") + "'";
               }

               if(model.Changed("NJGL_PD") == true)
               {
                  strUpdateSQL += ",NJGL_PD='" + model.NJGL_PD.Replace("'","''") + "'";
               }

               if(model.Changed("GLGK_SDSD") == true)
               {
                  strUpdateSQL += ",GLGK_SDSD='" + model.GLGK_SDSD.Replace("'","''") + "'";
               }

               if(model.Changed("GLGK_SCGL") == true)
               {
                  strUpdateSQL += ",GLGK_SCGL='" + model.GLGK_SCGL.Replace("'","''") + "'";
               }

               if(model.Changed("GLGK_XZGL") == true)
               {
                  strUpdateSQL += ",GLGK_XZGL='" + model.GLGK_XZGL.Replace("'","''") + "'";
               }

               if(model.Changed("GLGK_LBGL") == true)
               {
                  strUpdateSQL += ",GLGK_LBGL='" + model.GLGK_LBGL.Replace("'","''") + "'";
               }

               if(model.Changed("GLGL_YXBZ") == true)
               {
                  strUpdateSQL += ",GLGL_YXBZ='" + model.GLGL_YXBZ.Replace("'","''") + "'";
               }

               if(model.Changed("GLGL_SCBZ") == true)
               {
                  strUpdateSQL += ",GLGL_SCBZ='" + model.GLGL_SCBZ.Replace("'","''") + "'";
               }

               if(model.Changed("GLGL_PD") == true)
               {
                  strUpdateSQL += ",GLGL_PD='" + model.GLGL_PD.Replace("'","''") + "'";
               }

               if(model.Changed("SU_SDSD") == true)
               {
                  strUpdateSQL += ",SU_SDSD='" + model.SU_SDSD.Replace("'","''") + "'";
               }

               if(model.Changed("SU_JG") == true)
               {
                  strUpdateSQL += ",SU_JG='" + model.SU_JG.Replace("'","''") + "'";
               }

               if(model.Changed("SU_BZXX") == true)
               {
                  strUpdateSQL += ",SU_BZXX='" + model.SU_BZXX.Replace("'","''") + "'";
               }

               if(model.Changed("SU_BZSX") == true)
               {
                  strUpdateSQL += ",SU_BZSX='" + model.SU_BZSX.Replace("'","''") + "'";
               }

               if(model.Changed("SU_PD") == true)
               {
                  strUpdateSQL += ",SU_PD='" + model.SU_PD.Replace("'","''") + "'";
               }

               if(model.Changed("LC_SDLC") == true)
               {
                  strUpdateSQL += ",LC_SDLC='" + model.LC_SDLC.Replace("'","''") + "'";
               }

               if(model.Changed("LC_JG") == true)
               {
                  strUpdateSQL += ",LC_JG='" + model.LC_JG.Replace("'","''") + "'";
               }

               if(model.Changed("LC_XZ") == true)
               {
                  strUpdateSQL += ",LC_XZ='" + model.LC_XZ.Replace("'","''") + "'";
               }

               if(model.Changed("LC_PD") == true)
               {
                  strUpdateSQL += ",LC_PD='" + model.LC_PD.Replace("'","''") + "'";
               }

               if(model.Changed("JS_KSSD") == true)
               {
                  strUpdateSQL += ",JS_KSSD='" + model.JS_KSSD.Replace("'","''") + "'";
               }

               if(model.Changed("JS_JSSD") == true)
               {
                  strUpdateSQL += ",JS_JSSD='" + model.JS_JSSD.Replace("'","''") + "'";
               }

               if(model.Changed("JS_SJ") == true)
               {
                  strUpdateSQL += ",JS_SJ='" + model.JS_SJ.Replace("'","''") + "'";
               }

               if(model.Changed("JS_XZ") == true)
               {
                  strUpdateSQL += ",JS_XZ='" + model.JS_XZ.Replace("'","''") + "'";
               }

               if(model.Changed("JS_PD") == true)
               {
                  strUpdateSQL += ",JS_PD='" + model.JS_PD.Replace("'","''") + "'";
               }

               if(model.Changed("HX_KSSD") == true)
               {
                  strUpdateSQL += ",HX_KSSD='" + model.HX_KSSD.Replace("'","''") + "'";
               }

               if(model.Changed("HX_JSSD") == true)
               {
                  strUpdateSQL += ",HX_JSSD='" + model.HX_JSSD.Replace("'","''") + "'";
               }

               if(model.Changed("HX_SJ") == true)
               {
                  strUpdateSQL += ",HX_SJ='" + model.HX_SJ.Replace("'","''") + "'";
               }

               if(model.Changed("HX_LC") == true)
               {
                  strUpdateSQL += ",HX_LC='" + model.HX_LC.Replace("'","''") + "'";
               }

               if(model.Changed("HX_XZ") == true)
               {
                  strUpdateSQL += ",HX_XZ='" + model.HX_XZ.Replace("'","''") + "'";
               }

               if(model.Changed("HX_PD") == true)
               {
                  strUpdateSQL += ",HX_PD='" + model.HX_PD.Replace("'","''") + "'";
               }

               if(model.Changed("DPCGWD") == true)
               {
                  strUpdateSQL += ",DPCGWD='" + model.DPCGWD.Replace("'","''") + "'";
               }

               if(model.Changed("DPCGDQY") == true)
               {
                  strUpdateSQL += ",DPCGDQY='" + model.DPCGDQY.Replace("'","''") + "'";
               }

               if(model.Changed("DPCGSD") == true)
               {
                  strUpdateSQL += ",DPCGSD='" + model.DPCGSD.Replace("'","''") + "'";
               }

               if(model.Changed("CG_POT") == true)
               {
                  strUpdateSQL += ",CG_POT='" + model.CG_POT.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD1") == true)
               {
                  strUpdateSQL += ",CG_SDSD1='" + model.CG_SDSD1.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL1") == true)
               {
                  strUpdateSQL += ",CG_SCGL1='" + model.CG_SCGL1.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL1") == true)
               {
                  strUpdateSQL += ",CG_XZGL1='" + model.CG_XZGL1.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL1") == true)
               {
                  strUpdateSQL += ",CG_LBGL1='" + model.CG_LBGL1.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD2") == true)
               {
                  strUpdateSQL += ",CG_SDSD2='" + model.CG_SDSD2.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL2") == true)
               {
                  strUpdateSQL += ",CG_SCGL2='" + model.CG_SCGL2.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL2") == true)
               {
                  strUpdateSQL += ",CG_XZGL2='" + model.CG_XZGL2.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL2") == true)
               {
                  strUpdateSQL += ",CG_LBGL2='" + model.CG_LBGL2.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD3") == true)
               {
                  strUpdateSQL += ",CG_SDSD3='" + model.CG_SDSD3.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL3") == true)
               {
                  strUpdateSQL += ",CG_SCGL3='" + model.CG_SCGL3.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL3") == true)
               {
                  strUpdateSQL += ",CG_XZGL3='" + model.CG_XZGL3.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL3") == true)
               {
                  strUpdateSQL += ",CG_LBGL3='" + model.CG_LBGL3.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD4") == true)
               {
                  strUpdateSQL += ",CG_SDSD4='" + model.CG_SDSD4.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL4") == true)
               {
                  strUpdateSQL += ",CG_SCGL4='" + model.CG_SCGL4.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL4") == true)
               {
                  strUpdateSQL += ",CG_XZGL4='" + model.CG_XZGL4.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL4") == true)
               {
                  strUpdateSQL += ",CG_LBGL4='" + model.CG_LBGL4.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD5") == true)
               {
                  strUpdateSQL += ",CG_SDSD5='" + model.CG_SDSD5.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL5") == true)
               {
                  strUpdateSQL += ",CG_SCGL5='" + model.CG_SCGL5.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL5") == true)
               {
                  strUpdateSQL += ",CG_XZGL5='" + model.CG_XZGL5.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL5") == true)
               {
                  strUpdateSQL += ",CG_LBGL5='" + model.CG_LBGL5.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD6") == true)
               {
                  strUpdateSQL += ",CG_SDSD6='" + model.CG_SDSD6.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL6") == true)
               {
                  strUpdateSQL += ",CG_SCGL6='" + model.CG_SCGL6.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL6") == true)
               {
                  strUpdateSQL += ",CG_XZGL6='" + model.CG_XZGL6.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL6") == true)
               {
                  strUpdateSQL += ",CG_LBGL6='" + model.CG_LBGL6.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD7") == true)
               {
                  strUpdateSQL += ",CG_SDSD7='" + model.CG_SDSD7.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL7") == true)
               {
                  strUpdateSQL += ",CG_SCGL7='" + model.CG_SCGL7.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL7") == true)
               {
                  strUpdateSQL += ",CG_XZGL7='" + model.CG_XZGL7.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL7") == true)
               {
                  strUpdateSQL += ",CG_LBGL7='" + model.CG_LBGL7.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD8") == true)
               {
                  strUpdateSQL += ",CG_SDSD8='" + model.CG_SDSD8.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL8") == true)
               {
                  strUpdateSQL += ",CG_SCGL8='" + model.CG_SCGL8.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL8") == true)
               {
                  strUpdateSQL += ",CG_XZGL8='" + model.CG_XZGL8.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL8") == true)
               {
                  strUpdateSQL += ",CG_LBGL8='" + model.CG_LBGL8.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD9") == true)
               {
                  strUpdateSQL += ",CG_SDSD9='" + model.CG_SDSD9.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL9") == true)
               {
                  strUpdateSQL += ",CG_SCGL9='" + model.CG_SCGL9.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL9") == true)
               {
                  strUpdateSQL += ",CG_XZGL9='" + model.CG_XZGL9.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL9") == true)
               {
                  strUpdateSQL += ",CG_LBGL9='" + model.CG_LBGL9.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SDSD10") == true)
               {
                  strUpdateSQL += ",CG_SDSD10='" + model.CG_SDSD10.Replace("'","''") + "'";
               }

               if(model.Changed("CG_SCGL10") == true)
               {
                  strUpdateSQL += ",CG_SCGL10='" + model.CG_SCGL10.Replace("'","''") + "'";
               }

               if(model.Changed("CG_XZGL10") == true)
               {
                  strUpdateSQL += ",CG_XZGL10='" + model.CG_XZGL10.Replace("'","''") + "'";
               }

               if(model.Changed("CG_LBGL10") == true)
               {
                  strUpdateSQL += ",CG_LBGL10='" + model.CG_LBGL10.Replace("'","''") + "'";
               }

               if(model.Changed("ZGSD_JG") == true)
               {
                  strUpdateSQL += ",ZGSD_JG='" + model.ZGSD_JG.Replace("'","''") + "'";
               }

               if(model.Changed("ZGSD_BZ") == true)
               {
                  strUpdateSQL += ",ZGSD_BZ='" + model.ZGSD_BZ.Replace("'","''") + "'";
               }

               if(model.Changed("ZGSD_PD") == true)
               {
                  strUpdateSQL += ",ZGSD_PD='" + model.ZGSD_PD.Replace("'","''") + "'";
               }

               if(model.Changed("GLGK_ZS") == true)
               {
                  strUpdateSQL += ",GLGK_ZS='" + model.GLGK_ZS.Replace("'","''") + "'";
               }

               if(model.Changed("NJGK_ZS") == true)
               {
                  strUpdateSQL += ",NJGK_ZS='" + model.NJGK_ZS.Replace("'","''") + "'";
               }

               if(model.Changed("GK_DBGL") == true)
               {
                  strUpdateSQL += ",GK_DBGL='" + model.GK_DBGL.Replace("'","''") + "'";
               }

               if(model.Changed("GK_EDCS") == true)
               {
                  strUpdateSQL += ",GK_EDCS='" + model.GK_EDCS.Replace("'","''") + "'";
               }

               if(model.Changed("GK_JZL") == true)
               {
                  strUpdateSQL += ",GK_JZL='" + model.GK_JZL.Replace("'","''") + "'";
               }

               if(model.Changed("GK_WDCS") == true)
               {
                  strUpdateSQL += ",GK_WDCS='" + model.GK_WDCS.Replace("'","''") + "'";
               }

               if(model.Changed("GK_PD") == true)
               {
                  strUpdateSQL += ",GK_PD='" + model.GK_PD.Replace("'","''") + "'";
               }

               if(model.Changed("YH_SCZ") == true)
               {
                  strUpdateSQL += ",YH_SCZ='" + model.YH_SCZ.Replace("'","''") + "'";
               }

               if(model.Changed("YH_BZ") == true)
               {
                  strUpdateSQL += ",YH_BZ='" + model.YH_BZ.Replace("'","''") + "'";
               }

               if(model.Changed("YH_LC") == true)
               {
                  strUpdateSQL += ",YH_LC='" + model.YH_LC.Replace("'","''") + "'";
               }

               if(model.Changed("YH_SD") == true)
               {
                  strUpdateSQL += ",YH_SD='" + model.YH_SD.Replace("'","''") + "'";
               }

               if(model.Changed("YH_JZL") == true)
               {
                  strUpdateSQL += ",YH_JZL='" + model.YH_JZL.Replace("'","''") + "'";
               }

               if(model.Changed("YH_PD") == true)
               {
                  strUpdateSQL += ",YH_PD='" + model.YH_PD.Replace("'","''") + "'";
               }

              string strSql = "";
              strSql += "update RESULT_DPCG set ";
              strSql += strUpdateSQL.Substring(1);
              strSql += " where " + p_strWhere;

              return strSql;
          }

          /// <summary>
          /// 修改一个集合
          /// </summary>
          public bool UpdateRange(RESULT_DPCG model, string p_strWhere)
          {
              return DbHelper.ExecuteSql(UpdateRangeSQL(model, p_strWhere));
          }

          /// <summary>
          /// 修改全部数据 SQL
          /// </summary>
          public string UpdateAllSQL(RESULT_DPCG model)
          {
              string strUpdateSQL = "";

                  strUpdateSQL += ",ID=" + model.ID + "";
                  strUpdateSQL += ",JCLSH='" + model.JCLSH.Replace("'","''") + "'";
                  strUpdateSQL += ",DPCGJCCS='" + model.DPCGJCCS.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGK_SDSD='" + model.NJGK_SDSD.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGK_SCGL='" + model.NJGK_SCGL.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGK_XZGL='" + model.NJGK_XZGL.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGK_LBGL='" + model.NJGK_LBGL.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGL_YXBZ='" + model.NJGL_YXBZ.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGL_SCBZ='" + model.NJGL_SCBZ.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGL_PD='" + model.NJGL_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGK_SDSD='" + model.GLGK_SDSD.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGK_SCGL='" + model.GLGK_SCGL.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGK_XZGL='" + model.GLGK_XZGL.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGK_LBGL='" + model.GLGK_LBGL.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGL_YXBZ='" + model.GLGL_YXBZ.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGL_SCBZ='" + model.GLGL_SCBZ.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGL_PD='" + model.GLGL_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",SU_SDSD='" + model.SU_SDSD.Replace("'","''") + "'";
                  strUpdateSQL += ",SU_JG='" + model.SU_JG.Replace("'","''") + "'";
                  strUpdateSQL += ",SU_BZXX='" + model.SU_BZXX.Replace("'","''") + "'";
                  strUpdateSQL += ",SU_BZSX='" + model.SU_BZSX.Replace("'","''") + "'";
                  strUpdateSQL += ",SU_PD='" + model.SU_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",LC_SDLC='" + model.LC_SDLC.Replace("'","''") + "'";
                  strUpdateSQL += ",LC_JG='" + model.LC_JG.Replace("'","''") + "'";
                  strUpdateSQL += ",LC_XZ='" + model.LC_XZ.Replace("'","''") + "'";
                  strUpdateSQL += ",LC_PD='" + model.LC_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",JS_KSSD='" + model.JS_KSSD.Replace("'","''") + "'";
                  strUpdateSQL += ",JS_JSSD='" + model.JS_JSSD.Replace("'","''") + "'";
                  strUpdateSQL += ",JS_SJ='" + model.JS_SJ.Replace("'","''") + "'";
                  strUpdateSQL += ",JS_XZ='" + model.JS_XZ.Replace("'","''") + "'";
                  strUpdateSQL += ",JS_PD='" + model.JS_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_KSSD='" + model.HX_KSSD.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_JSSD='" + model.HX_JSSD.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_SJ='" + model.HX_SJ.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_LC='" + model.HX_LC.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_XZ='" + model.HX_XZ.Replace("'","''") + "'";
                  strUpdateSQL += ",HX_PD='" + model.HX_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",DPCGWD='" + model.DPCGWD.Replace("'","''") + "'";
                  strUpdateSQL += ",DPCGDQY='" + model.DPCGDQY.Replace("'","''") + "'";
                  strUpdateSQL += ",DPCGSD='" + model.DPCGSD.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_POT='" + model.CG_POT.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD1='" + model.CG_SDSD1.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL1='" + model.CG_SCGL1.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL1='" + model.CG_XZGL1.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL1='" + model.CG_LBGL1.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD2='" + model.CG_SDSD2.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL2='" + model.CG_SCGL2.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL2='" + model.CG_XZGL2.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL2='" + model.CG_LBGL2.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD3='" + model.CG_SDSD3.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL3='" + model.CG_SCGL3.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL3='" + model.CG_XZGL3.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL3='" + model.CG_LBGL3.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD4='" + model.CG_SDSD4.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL4='" + model.CG_SCGL4.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL4='" + model.CG_XZGL4.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL4='" + model.CG_LBGL4.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD5='" + model.CG_SDSD5.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL5='" + model.CG_SCGL5.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL5='" + model.CG_XZGL5.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL5='" + model.CG_LBGL5.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD6='" + model.CG_SDSD6.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL6='" + model.CG_SCGL6.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL6='" + model.CG_XZGL6.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL6='" + model.CG_LBGL6.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD7='" + model.CG_SDSD7.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL7='" + model.CG_SCGL7.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL7='" + model.CG_XZGL7.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL7='" + model.CG_LBGL7.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD8='" + model.CG_SDSD8.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL8='" + model.CG_SCGL8.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL8='" + model.CG_XZGL8.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL8='" + model.CG_LBGL8.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD9='" + model.CG_SDSD9.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL9='" + model.CG_SCGL9.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL9='" + model.CG_XZGL9.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL9='" + model.CG_LBGL9.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SDSD10='" + model.CG_SDSD10.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_SCGL10='" + model.CG_SCGL10.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_XZGL10='" + model.CG_XZGL10.Replace("'","''") + "'";
                  strUpdateSQL += ",CG_LBGL10='" + model.CG_LBGL10.Replace("'","''") + "'";
                  strUpdateSQL += ",ZGSD_JG='" + model.ZGSD_JG.Replace("'","''") + "'";
                  strUpdateSQL += ",ZGSD_BZ='" + model.ZGSD_BZ.Replace("'","''") + "'";
                  strUpdateSQL += ",ZGSD_PD='" + model.ZGSD_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",GLGK_ZS='" + model.GLGK_ZS.Replace("'","''") + "'";
                  strUpdateSQL += ",NJGK_ZS='" + model.NJGK_ZS.Replace("'","''") + "'";
                  strUpdateSQL += ",GK_DBGL='" + model.GK_DBGL.Replace("'","''") + "'";
                  strUpdateSQL += ",GK_EDCS='" + model.GK_EDCS.Replace("'","''") + "'";
                  strUpdateSQL += ",GK_JZL='" + model.GK_JZL.Replace("'","''") + "'";
                  strUpdateSQL += ",GK_WDCS='" + model.GK_WDCS.Replace("'","''") + "'";
                  strUpdateSQL += ",GK_PD='" + model.GK_PD.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_SCZ='" + model.YH_SCZ.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_BZ='" + model.YH_BZ.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_LC='" + model.YH_LC.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_SD='" + model.YH_SD.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_JZL='" + model.YH_JZL.Replace("'","''") + "'";
                  strUpdateSQL += ",YH_PD='" + model.YH_PD.Replace("'","''") + "'";


               string strSql = "";
               strSql += "update RESULT_DPCG set ";
               strSql += strUpdateSQL.Substring(1);

               return strSql;

          }

          /// <summary>
          /// 修改全部数据
          /// </summary>
          public bool UpdateAll(RESULT_DPCG model)
          {
              return DbHelper.ExecuteSql(UpdateAllSQL(model));
          }

          /// <summary>
          /// 删除一条数据 SQL
          /// </summary>
          public string DeleteSQL(string strJCLSH)
          {
              string strSql = "";
              strSql += "delete from RESULT_DPCG";
              strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              return strSql;

          }

          /// <summary>
          /// 删除一条数据
          /// </summary>
          public bool Delete(string strJCLSH)
          {
              return DbHelper.ExecuteSql(DeleteSQL(strJCLSH));
          }

          /// <summary>
          /// 删除一个集合 SQL
          /// </summary>
          public string DeleteRangeSQL(string p_strWhere)
          {
              string strSql = "";
              strSql += "delete from RESULT_DPCG";
              strSql += " where " + p_strWhere;

              return strSql;
           }

          /// <summary>
          /// 删除一个集合
          /// </summary>
          public bool DeleteRange(string p_strWhere)
          {
              return DbHelper.ExecuteSql(DeleteRangeSQL(p_strWhere));
          }

          /// <summary>
          /// 删除全部 SQL
          /// </summary>
          public string DeleteAllSQL()
          {
              string strSql = "";
              strSql += "delete from RESULT_DPCG";

              return strSql;
           }

         /// <summary>
         /// 删除全部
         /// </summary>
         public bool DeleteAll()
         {
             return DbHelper.ExecuteSql(DeleteAllSQL());
         }

          /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public RESULT_DPCG GetModel(string strJCLSH)
         {
             string strSql = "";
             strSql += "select * from RESULT_DPCG";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

             DataTable dtTemp = new DataTable();
             DbHelper.GetTable(strSql, ref dtTemp);

             RESULT_DPCG model = new RESULT_DPCG();

             if(dtTemp.Rows.Count>0)
             {
                 model = new RESULT_DPCG();

                 model.ID = dtTemp.Rows[0]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[0]["ID"]);
                 model.JCLSH = dtTemp.Rows[0]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[0]["JCLSH"].ToString();
                 model.DPCGJCCS = dtTemp.Rows[0]["DPCGJCCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPCGJCCS"].ToString();
                 model.NJGK_SDSD = dtTemp.Rows[0]["NJGK_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGK_SDSD"].ToString();
                 model.NJGK_SCGL = dtTemp.Rows[0]["NJGK_SCGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGK_SCGL"].ToString();
                 model.NJGK_XZGL = dtTemp.Rows[0]["NJGK_XZGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGK_XZGL"].ToString();
                 model.NJGK_LBGL = dtTemp.Rows[0]["NJGK_LBGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGK_LBGL"].ToString();
                 model.NJGL_YXBZ = dtTemp.Rows[0]["NJGL_YXBZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGL_YXBZ"].ToString();
                 model.NJGL_SCBZ = dtTemp.Rows[0]["NJGL_SCBZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGL_SCBZ"].ToString();
                 model.NJGL_PD = dtTemp.Rows[0]["NJGL_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGL_PD"].ToString();
                 model.GLGK_SDSD = dtTemp.Rows[0]["GLGK_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGK_SDSD"].ToString();
                 model.GLGK_SCGL = dtTemp.Rows[0]["GLGK_SCGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGK_SCGL"].ToString();
                 model.GLGK_XZGL = dtTemp.Rows[0]["GLGK_XZGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGK_XZGL"].ToString();
                 model.GLGK_LBGL = dtTemp.Rows[0]["GLGK_LBGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGK_LBGL"].ToString();
                 model.GLGL_YXBZ = dtTemp.Rows[0]["GLGL_YXBZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGL_YXBZ"].ToString();
                 model.GLGL_SCBZ = dtTemp.Rows[0]["GLGL_SCBZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGL_SCBZ"].ToString();
                 model.GLGL_PD = dtTemp.Rows[0]["GLGL_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGL_PD"].ToString();
                 model.SU_SDSD = dtTemp.Rows[0]["SU_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SU_SDSD"].ToString();
                 model.SU_JG = dtTemp.Rows[0]["SU_JG"] == DBNull.Value ? "" : dtTemp.Rows[0]["SU_JG"].ToString();
                 model.SU_BZXX = dtTemp.Rows[0]["SU_BZXX"] == DBNull.Value ? "" : dtTemp.Rows[0]["SU_BZXX"].ToString();
                 model.SU_BZSX = dtTemp.Rows[0]["SU_BZSX"] == DBNull.Value ? "" : dtTemp.Rows[0]["SU_BZSX"].ToString();
                 model.SU_PD = dtTemp.Rows[0]["SU_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["SU_PD"].ToString();
                 model.LC_SDLC = dtTemp.Rows[0]["LC_SDLC"] == DBNull.Value ? "" : dtTemp.Rows[0]["LC_SDLC"].ToString();
                 model.LC_JG = dtTemp.Rows[0]["LC_JG"] == DBNull.Value ? "" : dtTemp.Rows[0]["LC_JG"].ToString();
                 model.LC_XZ = dtTemp.Rows[0]["LC_XZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["LC_XZ"].ToString();
                 model.LC_PD = dtTemp.Rows[0]["LC_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["LC_PD"].ToString();
                 model.JS_KSSD = dtTemp.Rows[0]["JS_KSSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["JS_KSSD"].ToString();
                 model.JS_JSSD = dtTemp.Rows[0]["JS_JSSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["JS_JSSD"].ToString();
                 model.JS_SJ = dtTemp.Rows[0]["JS_SJ"] == DBNull.Value ? "" : dtTemp.Rows[0]["JS_SJ"].ToString();
                 model.JS_XZ = dtTemp.Rows[0]["JS_XZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["JS_XZ"].ToString();
                 model.JS_PD = dtTemp.Rows[0]["JS_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["JS_PD"].ToString();
                 model.HX_KSSD = dtTemp.Rows[0]["HX_KSSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_KSSD"].ToString();
                 model.HX_JSSD = dtTemp.Rows[0]["HX_JSSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_JSSD"].ToString();
                 model.HX_SJ = dtTemp.Rows[0]["HX_SJ"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_SJ"].ToString();
                 model.HX_LC = dtTemp.Rows[0]["HX_LC"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_LC"].ToString();
                 model.HX_XZ = dtTemp.Rows[0]["HX_XZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_XZ"].ToString();
                 model.HX_PD = dtTemp.Rows[0]["HX_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["HX_PD"].ToString();
                 model.DPCGWD = dtTemp.Rows[0]["DPCGWD"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPCGWD"].ToString();
                 model.DPCGDQY = dtTemp.Rows[0]["DPCGDQY"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPCGDQY"].ToString();
                 model.DPCGSD = dtTemp.Rows[0]["DPCGSD"] == DBNull.Value ? "" : dtTemp.Rows[0]["DPCGSD"].ToString();
                 model.CG_POT = dtTemp.Rows[0]["CG_POT"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_POT"].ToString();
                 model.CG_SDSD1 = dtTemp.Rows[0]["CG_SDSD1"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD1"].ToString();
                 model.CG_SCGL1 = dtTemp.Rows[0]["CG_SCGL1"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL1"].ToString();
                 model.CG_XZGL1 = dtTemp.Rows[0]["CG_XZGL1"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL1"].ToString();
                 model.CG_LBGL1 = dtTemp.Rows[0]["CG_LBGL1"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL1"].ToString();
                 model.CG_SDSD2 = dtTemp.Rows[0]["CG_SDSD2"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD2"].ToString();
                 model.CG_SCGL2 = dtTemp.Rows[0]["CG_SCGL2"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL2"].ToString();
                 model.CG_XZGL2 = dtTemp.Rows[0]["CG_XZGL2"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL2"].ToString();
                 model.CG_LBGL2 = dtTemp.Rows[0]["CG_LBGL2"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL2"].ToString();
                 model.CG_SDSD3 = dtTemp.Rows[0]["CG_SDSD3"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD3"].ToString();
                 model.CG_SCGL3 = dtTemp.Rows[0]["CG_SCGL3"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL3"].ToString();
                 model.CG_XZGL3 = dtTemp.Rows[0]["CG_XZGL3"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL3"].ToString();
                 model.CG_LBGL3 = dtTemp.Rows[0]["CG_LBGL3"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL3"].ToString();
                 model.CG_SDSD4 = dtTemp.Rows[0]["CG_SDSD4"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD4"].ToString();
                 model.CG_SCGL4 = dtTemp.Rows[0]["CG_SCGL4"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL4"].ToString();
                 model.CG_XZGL4 = dtTemp.Rows[0]["CG_XZGL4"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL4"].ToString();
                 model.CG_LBGL4 = dtTemp.Rows[0]["CG_LBGL4"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL4"].ToString();
                 model.CG_SDSD5 = dtTemp.Rows[0]["CG_SDSD5"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD5"].ToString();
                 model.CG_SCGL5 = dtTemp.Rows[0]["CG_SCGL5"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL5"].ToString();
                 model.CG_XZGL5 = dtTemp.Rows[0]["CG_XZGL5"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL5"].ToString();
                 model.CG_LBGL5 = dtTemp.Rows[0]["CG_LBGL5"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL5"].ToString();
                 model.CG_SDSD6 = dtTemp.Rows[0]["CG_SDSD6"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD6"].ToString();
                 model.CG_SCGL6 = dtTemp.Rows[0]["CG_SCGL6"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL6"].ToString();
                 model.CG_XZGL6 = dtTemp.Rows[0]["CG_XZGL6"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL6"].ToString();
                 model.CG_LBGL6 = dtTemp.Rows[0]["CG_LBGL6"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL6"].ToString();
                 model.CG_SDSD7 = dtTemp.Rows[0]["CG_SDSD7"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD7"].ToString();
                 model.CG_SCGL7 = dtTemp.Rows[0]["CG_SCGL7"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL7"].ToString();
                 model.CG_XZGL7 = dtTemp.Rows[0]["CG_XZGL7"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL7"].ToString();
                 model.CG_LBGL7 = dtTemp.Rows[0]["CG_LBGL7"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL7"].ToString();
                 model.CG_SDSD8 = dtTemp.Rows[0]["CG_SDSD8"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD8"].ToString();
                 model.CG_SCGL8 = dtTemp.Rows[0]["CG_SCGL8"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL8"].ToString();
                 model.CG_XZGL8 = dtTemp.Rows[0]["CG_XZGL8"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL8"].ToString();
                 model.CG_LBGL8 = dtTemp.Rows[0]["CG_LBGL8"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL8"].ToString();
                 model.CG_SDSD9 = dtTemp.Rows[0]["CG_SDSD9"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD9"].ToString();
                 model.CG_SCGL9 = dtTemp.Rows[0]["CG_SCGL9"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL9"].ToString();
                 model.CG_XZGL9 = dtTemp.Rows[0]["CG_XZGL9"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL9"].ToString();
                 model.CG_LBGL9 = dtTemp.Rows[0]["CG_LBGL9"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL9"].ToString();
                 model.CG_SDSD10 = dtTemp.Rows[0]["CG_SDSD10"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SDSD10"].ToString();
                 model.CG_SCGL10 = dtTemp.Rows[0]["CG_SCGL10"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_SCGL10"].ToString();
                 model.CG_XZGL10 = dtTemp.Rows[0]["CG_XZGL10"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_XZGL10"].ToString();
                 model.CG_LBGL10 = dtTemp.Rows[0]["CG_LBGL10"] == DBNull.Value ? "" : dtTemp.Rows[0]["CG_LBGL10"].ToString();
                 model.ZGSD_JG = dtTemp.Rows[0]["ZGSD_JG"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZGSD_JG"].ToString();
                 model.ZGSD_BZ = dtTemp.Rows[0]["ZGSD_BZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZGSD_BZ"].ToString();
                 model.ZGSD_PD = dtTemp.Rows[0]["ZGSD_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["ZGSD_PD"].ToString();
                 model.GLGK_ZS = dtTemp.Rows[0]["GLGK_ZS"] == DBNull.Value ? "" : dtTemp.Rows[0]["GLGK_ZS"].ToString();
                 model.NJGK_ZS = dtTemp.Rows[0]["NJGK_ZS"] == DBNull.Value ? "" : dtTemp.Rows[0]["NJGK_ZS"].ToString();
                 model.GK_DBGL = dtTemp.Rows[0]["GK_DBGL"] == DBNull.Value ? "" : dtTemp.Rows[0]["GK_DBGL"].ToString();
                 model.GK_EDCS = dtTemp.Rows[0]["GK_EDCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["GK_EDCS"].ToString();
                 model.GK_JZL = dtTemp.Rows[0]["GK_JZL"] == DBNull.Value ? "" : dtTemp.Rows[0]["GK_JZL"].ToString();
                 model.GK_WDCS = dtTemp.Rows[0]["GK_WDCS"] == DBNull.Value ? "" : dtTemp.Rows[0]["GK_WDCS"].ToString();
                 model.GK_PD = dtTemp.Rows[0]["GK_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["GK_PD"].ToString();
                 model.YH_SCZ = dtTemp.Rows[0]["YH_SCZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_SCZ"].ToString();
                 model.YH_BZ = dtTemp.Rows[0]["YH_BZ"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_BZ"].ToString();
                 model.YH_LC = dtTemp.Rows[0]["YH_LC"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_LC"].ToString();
                 model.YH_SD = dtTemp.Rows[0]["YH_SD"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_SD"].ToString();
                 model.YH_JZL = dtTemp.Rows[0]["YH_JZL"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_JZL"].ToString();
                 model.YH_PD = dtTemp.Rows[0]["YH_PD"] == DBNull.Value ? "" : dtTemp.Rows[0]["YH_PD"].ToString();
             }

             dtTemp.Dispose();

             return model;
         }

         /// <summary>
         /// 得到一个对象实体
         /// </summary>
         public void GetModel(ref DataTable p_dtData, string strJCLSH)
         {
             p_dtData.Clear();

             string strSql = "";
             strSql += "select * from RESULT_DPCG";
             strSql += " where ";
               strSql += " JCLSH='"+ strJCLSH +"'";

              DbHelper.GetTable(strSql, ref p_dtData);
         }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList(string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
               m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
               m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
               m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_DPCG";
          if(p_strWhere.Trim().Length > 0)
          {
               strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
               strSql += " order by " + p_strOrder;
          }

          DataTable dtTemp = new DataTable();

          if(p_intPageSize > 0)
          {
               DbHelper.GetTable(strSql, ref dtTemp, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
               DbHelper.GetTable(strSql, ref dtTemp);
          }

          RESULT_DPCG[] arrModel=new RESULT_DPCG[dtTemp.Rows.Count];

          for(int N=0;N<dtTemp.Rows.Count;N++)
          {
               arrModel[N] = new RESULT_DPCG();

                 arrModel[N].ID = dtTemp.Rows[N]["ID"] == DBNull.Value ? 0 : Convert.ToInt32(dtTemp.Rows[N]["ID"]);
                 arrModel[N].JCLSH = dtTemp.Rows[N]["JCLSH"] == DBNull.Value ? "" : dtTemp.Rows[N]["JCLSH"].ToString();
                 arrModel[N].DPCGJCCS = dtTemp.Rows[N]["DPCGJCCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPCGJCCS"].ToString();
                 arrModel[N].NJGK_SDSD = dtTemp.Rows[N]["NJGK_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGK_SDSD"].ToString();
                 arrModel[N].NJGK_SCGL = dtTemp.Rows[N]["NJGK_SCGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGK_SCGL"].ToString();
                 arrModel[N].NJGK_XZGL = dtTemp.Rows[N]["NJGK_XZGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGK_XZGL"].ToString();
                 arrModel[N].NJGK_LBGL = dtTemp.Rows[N]["NJGK_LBGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGK_LBGL"].ToString();
                 arrModel[N].NJGL_YXBZ = dtTemp.Rows[N]["NJGL_YXBZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGL_YXBZ"].ToString();
                 arrModel[N].NJGL_SCBZ = dtTemp.Rows[N]["NJGL_SCBZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGL_SCBZ"].ToString();
                 arrModel[N].NJGL_PD = dtTemp.Rows[N]["NJGL_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGL_PD"].ToString();
                 arrModel[N].GLGK_SDSD = dtTemp.Rows[N]["GLGK_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGK_SDSD"].ToString();
                 arrModel[N].GLGK_SCGL = dtTemp.Rows[N]["GLGK_SCGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGK_SCGL"].ToString();
                 arrModel[N].GLGK_XZGL = dtTemp.Rows[N]["GLGK_XZGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGK_XZGL"].ToString();
                 arrModel[N].GLGK_LBGL = dtTemp.Rows[N]["GLGK_LBGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGK_LBGL"].ToString();
                 arrModel[N].GLGL_YXBZ = dtTemp.Rows[N]["GLGL_YXBZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGL_YXBZ"].ToString();
                 arrModel[N].GLGL_SCBZ = dtTemp.Rows[N]["GLGL_SCBZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGL_SCBZ"].ToString();
                 arrModel[N].GLGL_PD = dtTemp.Rows[N]["GLGL_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGL_PD"].ToString();
                 arrModel[N].SU_SDSD = dtTemp.Rows[N]["SU_SDSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SU_SDSD"].ToString();
                 arrModel[N].SU_JG = dtTemp.Rows[N]["SU_JG"] == DBNull.Value ? "" : dtTemp.Rows[N]["SU_JG"].ToString();
                 arrModel[N].SU_BZXX = dtTemp.Rows[N]["SU_BZXX"] == DBNull.Value ? "" : dtTemp.Rows[N]["SU_BZXX"].ToString();
                 arrModel[N].SU_BZSX = dtTemp.Rows[N]["SU_BZSX"] == DBNull.Value ? "" : dtTemp.Rows[N]["SU_BZSX"].ToString();
                 arrModel[N].SU_PD = dtTemp.Rows[N]["SU_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["SU_PD"].ToString();
                 arrModel[N].LC_SDLC = dtTemp.Rows[N]["LC_SDLC"] == DBNull.Value ? "" : dtTemp.Rows[N]["LC_SDLC"].ToString();
                 arrModel[N].LC_JG = dtTemp.Rows[N]["LC_JG"] == DBNull.Value ? "" : dtTemp.Rows[N]["LC_JG"].ToString();
                 arrModel[N].LC_XZ = dtTemp.Rows[N]["LC_XZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["LC_XZ"].ToString();
                 arrModel[N].LC_PD = dtTemp.Rows[N]["LC_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["LC_PD"].ToString();
                 arrModel[N].JS_KSSD = dtTemp.Rows[N]["JS_KSSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["JS_KSSD"].ToString();
                 arrModel[N].JS_JSSD = dtTemp.Rows[N]["JS_JSSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["JS_JSSD"].ToString();
                 arrModel[N].JS_SJ = dtTemp.Rows[N]["JS_SJ"] == DBNull.Value ? "" : dtTemp.Rows[N]["JS_SJ"].ToString();
                 arrModel[N].JS_XZ = dtTemp.Rows[N]["JS_XZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["JS_XZ"].ToString();
                 arrModel[N].JS_PD = dtTemp.Rows[N]["JS_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["JS_PD"].ToString();
                 arrModel[N].HX_KSSD = dtTemp.Rows[N]["HX_KSSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_KSSD"].ToString();
                 arrModel[N].HX_JSSD = dtTemp.Rows[N]["HX_JSSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_JSSD"].ToString();
                 arrModel[N].HX_SJ = dtTemp.Rows[N]["HX_SJ"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_SJ"].ToString();
                 arrModel[N].HX_LC = dtTemp.Rows[N]["HX_LC"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_LC"].ToString();
                 arrModel[N].HX_XZ = dtTemp.Rows[N]["HX_XZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_XZ"].ToString();
                 arrModel[N].HX_PD = dtTemp.Rows[N]["HX_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["HX_PD"].ToString();
                 arrModel[N].DPCGWD = dtTemp.Rows[N]["DPCGWD"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPCGWD"].ToString();
                 arrModel[N].DPCGDQY = dtTemp.Rows[N]["DPCGDQY"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPCGDQY"].ToString();
                 arrModel[N].DPCGSD = dtTemp.Rows[N]["DPCGSD"] == DBNull.Value ? "" : dtTemp.Rows[N]["DPCGSD"].ToString();
                 arrModel[N].CG_POT = dtTemp.Rows[N]["CG_POT"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_POT"].ToString();
                 arrModel[N].CG_SDSD1 = dtTemp.Rows[N]["CG_SDSD1"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD1"].ToString();
                 arrModel[N].CG_SCGL1 = dtTemp.Rows[N]["CG_SCGL1"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL1"].ToString();
                 arrModel[N].CG_XZGL1 = dtTemp.Rows[N]["CG_XZGL1"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL1"].ToString();
                 arrModel[N].CG_LBGL1 = dtTemp.Rows[N]["CG_LBGL1"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL1"].ToString();
                 arrModel[N].CG_SDSD2 = dtTemp.Rows[N]["CG_SDSD2"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD2"].ToString();
                 arrModel[N].CG_SCGL2 = dtTemp.Rows[N]["CG_SCGL2"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL2"].ToString();
                 arrModel[N].CG_XZGL2 = dtTemp.Rows[N]["CG_XZGL2"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL2"].ToString();
                 arrModel[N].CG_LBGL2 = dtTemp.Rows[N]["CG_LBGL2"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL2"].ToString();
                 arrModel[N].CG_SDSD3 = dtTemp.Rows[N]["CG_SDSD3"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD3"].ToString();
                 arrModel[N].CG_SCGL3 = dtTemp.Rows[N]["CG_SCGL3"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL3"].ToString();
                 arrModel[N].CG_XZGL3 = dtTemp.Rows[N]["CG_XZGL3"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL3"].ToString();
                 arrModel[N].CG_LBGL3 = dtTemp.Rows[N]["CG_LBGL3"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL3"].ToString();
                 arrModel[N].CG_SDSD4 = dtTemp.Rows[N]["CG_SDSD4"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD4"].ToString();
                 arrModel[N].CG_SCGL4 = dtTemp.Rows[N]["CG_SCGL4"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL4"].ToString();
                 arrModel[N].CG_XZGL4 = dtTemp.Rows[N]["CG_XZGL4"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL4"].ToString();
                 arrModel[N].CG_LBGL4 = dtTemp.Rows[N]["CG_LBGL4"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL4"].ToString();
                 arrModel[N].CG_SDSD5 = dtTemp.Rows[N]["CG_SDSD5"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD5"].ToString();
                 arrModel[N].CG_SCGL5 = dtTemp.Rows[N]["CG_SCGL5"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL5"].ToString();
                 arrModel[N].CG_XZGL5 = dtTemp.Rows[N]["CG_XZGL5"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL5"].ToString();
                 arrModel[N].CG_LBGL5 = dtTemp.Rows[N]["CG_LBGL5"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL5"].ToString();
                 arrModel[N].CG_SDSD6 = dtTemp.Rows[N]["CG_SDSD6"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD6"].ToString();
                 arrModel[N].CG_SCGL6 = dtTemp.Rows[N]["CG_SCGL6"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL6"].ToString();
                 arrModel[N].CG_XZGL6 = dtTemp.Rows[N]["CG_XZGL6"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL6"].ToString();
                 arrModel[N].CG_LBGL6 = dtTemp.Rows[N]["CG_LBGL6"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL6"].ToString();
                 arrModel[N].CG_SDSD7 = dtTemp.Rows[N]["CG_SDSD7"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD7"].ToString();
                 arrModel[N].CG_SCGL7 = dtTemp.Rows[N]["CG_SCGL7"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL7"].ToString();
                 arrModel[N].CG_XZGL7 = dtTemp.Rows[N]["CG_XZGL7"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL7"].ToString();
                 arrModel[N].CG_LBGL7 = dtTemp.Rows[N]["CG_LBGL7"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL7"].ToString();
                 arrModel[N].CG_SDSD8 = dtTemp.Rows[N]["CG_SDSD8"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD8"].ToString();
                 arrModel[N].CG_SCGL8 = dtTemp.Rows[N]["CG_SCGL8"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL8"].ToString();
                 arrModel[N].CG_XZGL8 = dtTemp.Rows[N]["CG_XZGL8"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL8"].ToString();
                 arrModel[N].CG_LBGL8 = dtTemp.Rows[N]["CG_LBGL8"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL8"].ToString();
                 arrModel[N].CG_SDSD9 = dtTemp.Rows[N]["CG_SDSD9"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD9"].ToString();
                 arrModel[N].CG_SCGL9 = dtTemp.Rows[N]["CG_SCGL9"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL9"].ToString();
                 arrModel[N].CG_XZGL9 = dtTemp.Rows[N]["CG_XZGL9"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL9"].ToString();
                 arrModel[N].CG_LBGL9 = dtTemp.Rows[N]["CG_LBGL9"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL9"].ToString();
                 arrModel[N].CG_SDSD10 = dtTemp.Rows[N]["CG_SDSD10"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SDSD10"].ToString();
                 arrModel[N].CG_SCGL10 = dtTemp.Rows[N]["CG_SCGL10"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_SCGL10"].ToString();
                 arrModel[N].CG_XZGL10 = dtTemp.Rows[N]["CG_XZGL10"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_XZGL10"].ToString();
                 arrModel[N].CG_LBGL10 = dtTemp.Rows[N]["CG_LBGL10"] == DBNull.Value ? "" : dtTemp.Rows[N]["CG_LBGL10"].ToString();
                 arrModel[N].ZGSD_JG = dtTemp.Rows[N]["ZGSD_JG"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZGSD_JG"].ToString();
                 arrModel[N].ZGSD_BZ = dtTemp.Rows[N]["ZGSD_BZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZGSD_BZ"].ToString();
                 arrModel[N].ZGSD_PD = dtTemp.Rows[N]["ZGSD_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["ZGSD_PD"].ToString();
                 arrModel[N].GLGK_ZS = dtTemp.Rows[N]["GLGK_ZS"] == DBNull.Value ? "" : dtTemp.Rows[N]["GLGK_ZS"].ToString();
                 arrModel[N].NJGK_ZS = dtTemp.Rows[N]["NJGK_ZS"] == DBNull.Value ? "" : dtTemp.Rows[N]["NJGK_ZS"].ToString();
                 arrModel[N].GK_DBGL = dtTemp.Rows[N]["GK_DBGL"] == DBNull.Value ? "" : dtTemp.Rows[N]["GK_DBGL"].ToString();
                 arrModel[N].GK_EDCS = dtTemp.Rows[N]["GK_EDCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["GK_EDCS"].ToString();
                 arrModel[N].GK_JZL = dtTemp.Rows[N]["GK_JZL"] == DBNull.Value ? "" : dtTemp.Rows[N]["GK_JZL"].ToString();
                 arrModel[N].GK_WDCS = dtTemp.Rows[N]["GK_WDCS"] == DBNull.Value ? "" : dtTemp.Rows[N]["GK_WDCS"].ToString();
                 arrModel[N].GK_PD = dtTemp.Rows[N]["GK_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["GK_PD"].ToString();
                 arrModel[N].YH_SCZ = dtTemp.Rows[N]["YH_SCZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_SCZ"].ToString();
                 arrModel[N].YH_BZ = dtTemp.Rows[N]["YH_BZ"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_BZ"].ToString();
                 arrModel[N].YH_LC = dtTemp.Rows[N]["YH_LC"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_LC"].ToString();
                 arrModel[N].YH_SD = dtTemp.Rows[N]["YH_SD"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_SD"].ToString();
                 arrModel[N].YH_JZL = dtTemp.Rows[N]["YH_JZL"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_JZL"].ToString();
                 arrModel[N].YH_PD = dtTemp.Rows[N]["YH_PD"] == DBNull.Value ? "" : dtTemp.Rows[N]["YH_PD"].ToString();
          }

          dtTemp.Dispose();

          return arrModel;
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList(string p_strWhere)
      {
          return GetModelList(p_strWhere, "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList(string p_strWhere, string p_strOrder)
      {
          return GetModelList(p_strWhere, p_strOrder, -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList(int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList("", "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList(string p_strWhere, int p_intPageNumber, int p_intPageSize)
      {
          return GetModelList(p_strWhere, "", p_intPageNumber, p_intPageSize);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public RESULT_DPCG[] GetModelList()
      {
          return GetModelList("", "", -1, -1);
      }

      /// <summary>
      /// 得到对象集合
      /// </summary>
      public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder, int p_intPageNumber, int p_intPageSize)
      {
          p_dtData.Clear();

          int m_intPageNumber = p_intPageNumber;
          int m_intPageCount = GetPageCount(p_strWhere, p_intPageSize);

          if((m_intPageNumber < 1) || (m_intPageNumber == 0))
          {
              m_intPageNumber = 1;
          }

          if(m_intPageNumber == -1)
          {
              m_intPageNumber = m_intPageCount;
          }

          if(m_intPageNumber > m_intPageCount)
          {
              m_intPageNumber = m_intPageCount;
          }

          string strSql = "";
          strSql += "select * from RESULT_DPCG";
          if(p_strWhere.Trim().Length > 0)
          {
              strSql += " where " + p_strWhere;
          }
          if(p_strOrder.Trim().Length > 0)
          {
              strSql += " order by " + p_strOrder;
          }

          if(p_intPageSize > 0)
          {
              DbHelper.GetTable(strSql, ref p_dtData, (m_intPageNumber-1)*p_intPageSize, p_intPageSize);
          }
          else
          {
              DbHelper.GetTable(strSql, ref p_dtData);
          }
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere)
       {
           GetModelList(ref p_dtData, p_strWhere, "", -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, string p_strOrder)
       {
           GetModelList(ref p_dtData, p_strWhere, p_strOrder, -1, -1);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, "", "", p_intPageNumber, p_intPageSize);
       }

       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData, string p_strWhere, int p_intPageNumber, int p_intPageSize)
       {
           GetModelList(ref p_dtData, p_strWhere, "", p_intPageNumber, p_intPageSize);
       }
       /// <summary>
       /// 得到对象集合
       /// </summary>
       public void GetModelList(ref DataTable p_dtData)
       {
           GetModelList(ref p_dtData, "", "", -1, -1);
       }
   }
}
